import { Inject, Injectable } from '@nestjs/common';

@Injectable()
export class NestLogService {
  // 服务中使用外面传递过来的参数
  constructor(@Inject('PREFIX') private readonly prefix: string) {}

  log(str: string): void {
    console.log(`${this.prefix}-${str}`);
  }
}
